TC's standard I/O (input/output) FUNCTIONS are contained in the ANSI library. The standard header file stdio.h contains declarations for these functions; i.e., any source file which uses standard I/O functions should contain the preprocessor directive:
# include <stdio.h>
In practice, professional TC programs often call the Macintosh Toolbox routines (via the MacTraps specialized library) directly to accomplish the user interface rather than use the standard I/O library. This technique produces efficient but non-portable programs which take full advantage of the Macintosh's graphical capabilities. Nonetheless, the standard I/O functions are useful for producing portable programs where a command-line user interface is tolerated.
The standard ANSI I/O functions treat input and output as "streams" of bytes or characters, which are written to and read from binary or text files or I/O devices. The procedure for addressing such a file or device is: first "open" the stream; perform I/O; then "close" the stream.